/**
 * ...
 * @author HTML5
 */

//------------------------------------------------
//---------------------POO EMULATION--------------
//------------------------------------------------
//------------------------------------------------

function POO(){}

	// static 
	POO._extends = new Array();
	
	POO.extend = function( p_child, p_ancestor )
	{
		POO._extends.push({"child":p_child,"ancestor":p_ancestor});
	};

	POO.run = function()
	{
		var obj = null;
		var i = 0;
		var max = POO._extends.length;
		var prop = null;
		
		for (i = 0; i < max; i++ )
		{
			
			obj = POO._extends[i];
			
			
			for( prop in obj.ancestor.prototype )
			{
				if( typeof(obj.child.prototype[prop]) == "undefined" )
				{
					obj.child.prototype[prop] = obj.ancestor.prototype[prop];
				}
				
				obj.child.prototype._super = obj.child.prototype._super || {};
				obj.child.prototype._super[prop] = obj.ancestor.prototype[prop];
			}
			
		}
	}